<?php
require('IncludeManager.php');

using('Junction_MappingDom');
using('Junction_SqlGenerator');
using('Junction_Criterion');

$mappingDom = Junction_MappingDom::getMappingDom('test.xml');

$widgetClass = $mappingDom->getClass('Widget');

$criterion = new Junction_Criterion(
	$widgetClass->getAttribute('name'),
	Junction_Criterion::$EQUAL,
	'foo'
);

$sql = Junction_SqlGenerator::generateSelect($widgetClass, $criterion);

echo $sql;

?>
